//构建mongoose的数据模型
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const mongoosePaginate = require('mongoose-paginate');

//定义
var userSchema = new mongoose.Schema({
    //schema=模型
    name:String,
    star:Number,
    date:{type:Date},
    content:String,
    blogsid:String,
});

userSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('Comments',userSchema,'comments');
